home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / open < prev    next >
Text File  |  2001-03-21  |  1KB  |  33 lines

  1. Synopsis:
  2.    $open(<file> R|W)
  3.  
  4. Technical:
  5.    This functions allows the client to open an arbitrary file for reading or
  6.    writing.  Write mode appends to the file.  The function returns a file
  7.    descriptor for the open file; the file descriptor is an integer.  Tilde-
  8.    expansion is permitted.
  9.  
  10. Practical:
  11.    The $open() function is the doorway to external file access from within
  12.    the client (aside from EXECing a process).  Assuming the file has the
  13.    appropriate permissions, it allows you to open the file for read or
  14.    write access (but not both).  Write access only appends to the file, so
  15.    you'll need to use $unlink() or $rename() if you want to start fresh.
  16.  
  17. Returns:
  18.    file descriptor, or nothing if error
  19.  
  20. Options:
  21.    R   open file for reading
  22.    W   open file for writing
  23.  
  24. Examples:
  25.    $open(~/.ircrc W)                 open your .ircrc for writing
  26.    $open(~/.irclog R)                open your logfile for reading
  27.    $open(/etc/passwd W)              will probably fail
  28.  
  29. See Also:
  30.    close(6); randread(6); read(6); rename(6); unlink(6);
  31.    write(6); writeb(6)
  32.  
  33.